//
//  String.swift
//  
//
//  Created by tangbl93 on 2021/1/6.
//

import Foundation

// Const
public extension String {
    
    /// the return key value
    static let yx_keyboardReturn = "\n"
}

// Date
public extension String {
    
    /// convert to date
    func yx_date(with format: String, dateFormatter: DateFormatter = DateFormatter.yx_current) -> Date? {
        dateFormatter.dateFormat = format
        return dateFormatter.date(from: self)
    }
}
